package com.itheima.controller;

import com.itheima.pojo.Product;
import com.itheima.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class ProductController {

    /**
     * 获取商品列表(使用List绑定数据)
     */
    @RequestMapping("/getProducts")
    public String getProducts(@RequestParam("proIds") List<String> proIds,HttpServletRequest request) {
        request.getSession().setAttribute("proids",proIds);
        return "output";
    }


}

